<ui:composition template="/WEB-INF/templates/login-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="menu"></ui:define>
	<ui:define name="submenu"></ui:define>
	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">		
	
	<h:form > 
	
	<p:growl/>
	<h:panelGrid style="width: 80%" id="rrfsPanel">
	     <h:outputText value="Short List Profiles " styleClass="outputTextTitle"/>	

 		

		
          <h:panelGrid >  
             <p:scrollPanel style="width:830px;height:470px" mode="native">   
		       <p:dataTable value="#{managerShortListProfilesBean.recruitmentProfiles}" var="profile">
							
					<p:column headerText="S.No">
						<h:outputText value="#{profile.sno}" />
					</p:column>
					<p:column headerText="Candidate Name">
						<h:outputText value="#{profile.candidateName}" />
					</p:column>
					<p:column headerText="View Profile">  
		               <p:commandLink  value="View Profile" actionListener="#{managerShortListProfilesBean.fileDownload}" 
									ajax="false" update="@form" styleClass="downloadResumeCommandLink" style="color:blue;" title="Click to Download Resume">
									  <f:param name="candidateEmail" value="#{profile.candidateEmail}" />
									  <p:fileDownload value="#{managerShortListProfilesBean.file}"></p:fileDownload>
						</p:commandLink>
		            </p:column>
					<p:column headerText="Candidate Email">
						<h:outputText value="#{profile.candidateEmail}" />
					</p:column>
					<p:column headerText="Contact No">
						<h:outputText value="#{profile.candidateMobileNumber}" />
					</p:column>
					<p:column headerText="Location">
						<h:outputText value="#{profile.candidateCurrentLocation}" />
					</p:column>
					<p:column headerText="Source">
						<h:outputText value="#{profile.recruitmentVendor.vendorName} "/>
					</p:column>
					<p:column headerText="Remarks">
						<h:outputText value="#{profile.remarks}" />
					</p:column>
					<p:column headerText="Short List">
						<p:selectOneMenu value="#{profile.shortListed}" style="width:50px;">
							<f:selectItems value="#{managerShortListProfilesBean.shortListedMap}" />
			   			</p:selectOneMenu> 
					</p:column>
					<p:column headerText="Short List Remarks">
						<p:inputTextarea  value="#{profile.managerShortListRemarks}" rows="1" autoResize="false"/>
					</p:column> 
					<p:column headerText="Interview Mode">
						<p:selectOneMenu value="#{profile.interviewMode}" >
							<f:selectItems value="#{managerShortListProfilesBean.interviewModeMap}" />
			   			</p:selectOneMenu> 
					</p:column>
					
				</p:dataTable>
			  </p:scrollPanel>
			  </h:panelGrid>
			 
			<h:panelGroup style="float:right;">
				 	<p:commandButton value="ShortList"  actionListener="#{managerShortListProfilesBean.shortListResourcesAction}" update="@form"/>
				    <p:commandButton value="Close" onclick="window.close();" rendered="#{managerShortListProfilesBean.renderCloseButton}"/> 
				    <p:commandButton value="Back" onclick="history.back();" rendered="#{managerShortListProfilesBean.renderBackButton}"/> 
			</h:panelGroup>
				
		</h:panelGrid>			
     </h:form>
	</ui:define>
</ui:composition>
